<?php
/**
 * Created by PhpStorm.
 * User: wangan
 * Date: 2018/3/28
 * Time: 10:11
 */
namespace App\Service;

use App\Model\Goods;
use App\Model\SalesDetail;
use Illuminate\Support\Facades\DB;

class GoodsService
{
    public static function getGoodsByname($str_name){
        $model_ret = Goods::where('goods_name', 'like', '%'.$str_name.'%')
            ->select(['id','goods_name', 'price'])
            ->get();
        return $model_ret;
    }
}